# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=jack_delay
pkgver=0.4.2
pkgrel=2
pkgdesc="Measure the round-trip latency of a soundcard"
arch=(loong64 x86_64)
url="https://kokkinizita.linuxaudio.org/linuxaudio/"
license=(GPL2)
groups=(pro-audio)
depends=(
  gcc-libs
  glibc
  jack
)
source=(https://kokkinizita.linuxaudio.org/linuxaudio/downloads/$pkgname-$pkgver.tar.bz2)
sha512sums=('12ba971abe8a99211bf6bc8b1a1c17ee18707fb3ebf09b5320cb0a83e8698183365ca6fefb651ac6dd337eb8c620e8fe804d7353c86a6f1d04455d9e2c319728')
b2sums=('f56125475ca1c60c1e3d45e02b6dc3df6bd47ac0f86879247c0b715b7f6872c9e94c7d6faa2e034ef40fc1f78a9bfd9ab8ff34acfdece7ed3490bc750638ba44')

prepare() {
  sed -e '/march=native/d' -i $pkgname-$pkgver/source/Makefile
}

build() {
  make -C $pkgname-$pkgver/source
}

package() {
  make PREFIX=/usr DESTDIR="$pkgdir/" install -C $pkgname-$pkgver/source
  install -vDm 644 $pkgname-$pkgver/{AUTHORS,README} -t "$pkgdir/usr/share/doc/$pkgname/"
}
